package com.sx.service.utils.sender;

import com.sx.service.system.IConfigService;
import com.sx.service.utils.sender.impl.SmsServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @author AdinZ
 * @date 2020/11/12 14:16
 */
@Component
public class SenderConfig {

    @Bean
    public SenderFactory beanFactory(IConfigService configService){
        SenderFactory factory= new SenderFactory();
        factory.registered(new SmsServiceImpl(configService.findConfig("aliyun_sms")));


        return factory;
    }


}
